package com.zy.qudadid.utils;

/**
 * Created by ninos on 2016/12/21.
 */

public class CarUtil {
    public static String getCarType(String type){
        if (type.equals("1"))
            return "实时";
        else
            return type.equals("2")?"预约":"拼车";
    }

    public static String getMode(String mode){
        String m = "1";
        switch (mode){
            case "实时":
                m = "1";
                break;
            case "预约":
                m = "2";
                break;
            case "拼车":
                m = "3";
                break;
            case "全部":
                m = "4";
                break;
        }
        return m;
    }

    public static String getStrokeState(String state) {
        String s = "无状态";
        switch (state) {
            case "0":
                s = "等待中";
                break;
            case "1":
                s = "已接单";
                break;
            case "2":
                s = "行驶中";
                break;
            case "3":
                s = "已完成";
                break;
            case "4":
                s = "已取消";
                break;
            case "5":
                s = "未支付";
                break;
            case "6":
                s = "未评论";
                break;
            case "7":
                s = "待确认";
                break;
        }
        return s;
    }
}
